//package com.ruoyi.quartz.task;
///*
// * @ClassName QuickMarkTask
// * @Description //TODO
// * @Author Administrator
// * @Date 2024/4/15 12:07
// **/
//
//import cn.hutool.core.date.DateTime;
//import cn.hutool.core.date.DateUtil;
//import com.ruoyi.common.utils.DateUtils;
//import com.ruoyi.system.domain.QuickMarkRecord;
//import com.ruoyi.system.service.IQuickMarkRecordService;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import java.util.Date;
//import java.util.List;
//
//@Slf4j
//@Component
//public class QuickMarkTask {
//
//    @Autowired
//    private IQuickMarkRecordService quickMarkRecordService;
//
//    @Scheduled(cron = "0 */1 * * * ?")
//    public void meetingStartTask(){
//        QuickMarkRecord quickMarkRecord = new QuickMarkRecord();
//        quickMarkRecord.setStatus("0");
//        List<QuickMarkRecord> quickMarkRecords = quickMarkRecordService.selectQuickMarkRecordList(quickMarkRecord);
//        for(QuickMarkRecord vo: quickMarkRecords){
//            String timeLimit = vo.getTimeLimit();
//            Date createTime = vo.getCreateTime();
//            Date nowDate = DateUtils.getNowDate();
//            Date timeLimitDead = new Date();
//            if("0".equals(timeLimit)){
//                timeLimitDead = DateUtil.offsetDay(createTime, 3);
//            }else if("1".equals(timeLimit)){
//                timeLimitDead = DateUtil.offsetDay(createTime,7);
//            }else if("2".equals(timeLimit)){
//                timeLimitDead = DateUtil.offsetMonth(createTime,1);
//            }
//            if(DateUtil.compare(nowDate,timeLimitDead)>0){
//                QuickMarkRecord quickMark = new QuickMarkRecord();
//                quickMark.setStatus("1");
//                quickMark.setId(vo.getId());
//                quickMarkRecordService.updateQuickMarkRecord(quickMark);
//            }
//        }
//    }
//}
